package com.example.android.bluetoothchat;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;

import com.example.android.common.activities.SampleActivityBase;

/**
 * Created by Administrator on 2017/4/23 0023.
 */

public class ServerActivity extends SampleActivityBase {

    public static final String TAG = "ServerActivity";

    // Whether the Log Fragment is currently shown
    private boolean mLogShown;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_server);

        // 加载ServerFragment
        if (savedInstanceState == null) {
            FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
            ServerFragment fragment = new ServerFragment();
            transaction.replace(R.id.sample_content_fragment, fragment);
            transaction.commit();
        }
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        //MyApplication.moveToBack(this);
    }

    public static void go(Context context){
        Intent intent = new Intent(context ,ServerActivity.class);
        context.startActivity(intent);
    }
}
